Skip to content

Add TypeScript type declarations#4

Merged
NikhilVerma merged 1 commit intomasterfrom
add-typescript-types
Feb 4, 2026
Merged

Add TypeScript type declarations#4
NikhilVerma merged 1 commit intomasterfrom
add-typescript-types

Conversation

@NikhilVerma
Copy link

@NikhilVerma NikhilVerma commented Feb 4, 2026

Summary

  • Add index.d.ts with full TypeScript type definitions
  • Bump version to 3.2.4

Types Added

  • RegulaOptions - All configuration options
  • RegulaResult - Full result structure with rule_results and summary
  • RuleResult - Individual rule result with all fields
  • SourceLocation - Source code location info

This fixes the TypeScript error:

Could not find a declaration file for module 'regula-wasi'

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added TypeScript type definitions for complete type safety and enhanced IDE code completion.
  • Chores

    • Version bump to 3.2.4.

- Add index.d.ts with full type definitions for RegulaOptions and RegulaResult
- Bump version to 3.2.4
- Include index.d.ts in package files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

Walkthrough

This pull request adds TypeScript type declarations for Regula integration. A new index.d.ts file is introduced with interfaces defining the API surface: RegulaOptions for configuration, SourceLocation for file positions, RuleResult for individual rule outcomes, and RegulaResult for aggregated results. Two public functions are exported: runRegula() and validate() (alias), both accepting file paths and optional configuration options. The package.json is updated to version 3.2.4, declares the types file, and includes it in the published artifact.

Poem

Types take shape where code runs free,
Regula's rules now for all to see,
TS declarations dance and align,
A contract carved, now crystal fine ✨
Version bumped, the types take the stage!

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add TypeScript type declarations' directly matches the PR's main objective of introducing type definitions for the regula package.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-typescript-types

Comment @coderabbitai help to get the list of available commands and usage tips.

@NikhilVerma NikhilVerma merged commit 8bafd7c into master Feb 4, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant